package com.zq.mycloud.core.respones;

import com.zq.mycloud.core.consts.ErrorCodeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author ：zhang qiang
 * @package :com.zq.mycloud.gateway.respones
 * @date ：Created in 2020/11/21 上午12:25
 * @description：
 * @modified By：
 * @version: $
 */
@Data
@NoArgsConstructor
public class GeneralResult<T> implements Serializable {

    private String code = ErrorCodeConstant.SUCCESS;

    private String message;

    private String msg;

    private T data;

    public GeneralResult(T data) {
        this.data = data;
    }

    public GeneralResult(String code, String message, String msg, T data) {
        this.code = code;
        this.message = message;
        this.msg = msg;
        this.data = data;
    }

    public GeneralResult(String code, String message, String msg) {
        this.code = code;
        this.message = message;
        this.msg = msg;
    }

    public GeneralResult(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
